"""
1、数据定义DDL：库的创建删除、表的创建删除
2、数据操纵DML：数据的增删改查
3、数据控制DCL：
4、数据查询DQL：
"""
"""
查看所有库         show databases;
创建库world       creat database world;
使用库world       use world;

创建表student（先使用库world)
create table student(
   id int,
   name varchar,
   age int
);

----------------------------------------------------------------------------------------   基础操作
添加数据              insert into student(id,name,age) values(1,'张三',12),(2,'李四',22);
删除id=1的那行数据     delete from student where id = 1;
全部删除              delete from student
更新id=4的名字为张三    updata student set name ='张三' where id = 4;
全部更新为赵六         updata student set name ='赵六'

查询                 select id,name,age from student
查询过滤后的数据       select id,name from student where age > 10;


分组                select gender ,avg(age) from student group by gender;（按性别分组，前面有的话也只能是性别）


结果排序             select gender,max(age) from student group by gender order by age asc升/desc降;

分页                select age from student limit 5(限制只取5条数据）;
                                                 (10,5) - 从第11条开始，取5条
                                                 
可以分行写          select age from student where age > 20 group by age
                  order by age;                                                  
                                                 
                                                 
书写顺序：
       select 列/聚合函数 from student
       where
       group by
       having
       order by
       limit

"""
